import axios from 'axios';

let base = 'http://localhost:3000';
/* ===============自营生产============== */
/**
 * 获取自营商城列表数据
 * @param params
 * @returns {*}
 */
export const getProductListByParams = params => {
    return axios.get(`${base}/sy_shop/api/index.do`, { params: params }).then(res => res.data.seller.productList);
};


/* ===============首页api============== */
/**
 * 获取首页公司列表
 * @param params
 * @returns {*}
 */
export const getCompanyList = params => {
    return axios.get(`${base}/api/company/get`, { params: params }).then(res => res.data.data.list);
};

/**
 * 获取Banner列表
 * @param params
 * @returns {*}
 */
export const getBannerList = params => {
    return axios.get(`${base}/api/company/get`, { params: params }).then(res => res.data.data.banner);
};

/**
 * 专家列表数据
 * @param params
 * @returns {*}
 */
export const getExpertList = params => {
    return axios.get(`${base}/api/index/expertData`, { params: params }).then(res => res.data);
};

/* 物性库页面分类数据
* @param params
* @returns {*}
*/
export const getPropertType = params => {
   return axios.get(`${base}/api/mock/typelist`, { params: params }).then(res => res.data);
};
/* 物性库页面产品数据
* @param params
* @returns {*}
*/
export const getProList = params => {
    return axios.get(`${base}/api/mock/levellist`, { params: params }).then(res => res.data);
 };
/* 物性库详情页面产品数据
* @param params
* @returns {*}
*/
export const getDetList = params => {
    return axios.get(`${base}/api/mock/detailslist`, { params: params }).then(res => res.data);
 };
/**
 * 我的订单付款、物流信息数据
 * @param params
 * @returns {*}
 */
export const myorderList = params => {
    return axios.get(`${base}/api/order/detail`, { params: params }).then(res => res.data);
};
/**
* 我的订单表格数据
* @param params
* @returns {*}
*/
export const orderList = params => {
   return axios.get(`${base}/api/product/order`, { params: params }).then(res => res.data);
};
/**
 * 我的发票表格信息
 * @param params
 * @returns {*}
 */
export const billtable = params => {
    return axios.get(`${base}/api/product/invoice`, { params: params }).then(res => res.data);
};
/**
 * 收支明细表格信息
 * @param params
 * @returns {*}
 */
export const incometable = params => {
    return axios.get(`${base}/api/product/detail`, { params: params }).then(res => res.data);
};
/**
 * 员工表格信息
 * @param params
 * @returns {*}
 */
export const mystafftable = params => {
    return axios.get(`${base}/api/product/staff`, { params: params }).then(res => res.data);
}
/**
 * 产品管理表格信息
 * @param params
 * @returns {*}
 */
export const managementable = params => {
    return axios.get(`${base}/api/product/management`, { params: params }).then(res => res.data);
}
/**
 * 我的服务表格信息
 * @param params
 * @returns {*}
 */
export const myservertable = params => {
    return axios.get(`${base}/api/product/service`, { params: params }).then(res => res.data);
}

/**
 * 资讯中心数据
 * @param params
 * @returns {*}
 */
export const Mationcontent = params => {
    return axios.get(`${base}/api/mock/information`, { params: params }).then(res => res.data.data.Recom);
}
/**
 * 资讯中心列表数据
 * @param params
 * @returns {*}
 */
export const Listdetails = params => {
    return axios.get(`${base}/api/mock/information`, { params: params }).then(res => res.data.data.Recom_list);
}

/**
 * 资讯中心tab数据
 * @param params
 * @returns {*}
 */
export const Handoverlist = params => {
    return axios.get(`${base}/api/mock/information`, { params: params }).then(res => res.data.data.Handoverlist);
}

/**
 * 客户资源数据
 * @param params
 * @returns {*}
 */
export const Custresources = params => {
    return axios.get(`${base}/api/mock/customer`, { params: params }).then(res => res.data);
}

/**
 * 用户登陆页面数据
 * @param params
 * @returns {*}
 */
export const logindata = params => {
    return axios.get(`${base}/sy_shop/api/UserLogin`, { params: params }).then(res => res.data);
}
// 塑云金融
export const finaServer = params => {
    return axios.get(`${base}/api/mock/finaServer`, { params: params }).then(res => res.data);
}
//我的企业
export const myenterpriseData = params => {
    return axios.get(`${base}/api/product/myenterprise`, { params: params }).then(res => res.data);
}
// 

export const ascend = params => {
    return axios.get(`${base}/api/mock/ascend`, { params: params }).then(res => res.data);
}
// 

// 发布产品
export const releaseProduct = params => {
    return axios.get(`${base}/api/product/bidding`, {params: params }).then(res => res.data);
}
//下订单
export const getUsermesg = params => {
    return axios.get(`${base}/api/order/raddress`, { params: params }).then(res => res.data);
}
export const getMaymesg = params => {
    return axios.get(`${base}/sy_shop/api/Paymentmethod`, { params: params }).then(res => res.data);
}
//

//技术专家
export const gettableData = params => {
    return axios.get(`${base}/api/technician/expertcf`, { params: params }).then(res => res.data);
}
export const getbanner = params => {
    return axios.get(`${base}/api/technician/exporti`, { params: params }).then(res => res.data);
}
export const getProblemList = params => {
    return axios.get(`${base}/api/technician/problems`, { params: params }).then(res => res.data);
}
//
// 该合并了
